package com.note.app.dto.collaboration;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 协作操作DTO
 */
@Data
@Schema(description = "协作操作信息")
public class CollaborationOperationDTO {
    
    @Schema(description = "操作ID")
    private Long id;
    
    @Schema(description = "会话ID")
    private Long sessionId;
    
    @Schema(description = "用户ID")
    private Long userId;
    
    @Schema(description = "用户名称")
    private String username;
    
    @Schema(description = "用户颜色")
    private String userColor;
    
    @Schema(description = "内容ID(MongoDB中的_id)")
    private String contentId;
    
    @Schema(description = "操作类型: 0-插入, 1-删除, 2-替换, 3-格式化, 4-注释")
    private Integer opType;
    
    @Schema(description = "版本号")
    private Integer version;
    
    @Schema(description = "操作位置", example = "{\"index\":10}")
    private String position;
    
    @Schema(description = "操作内容", example = "{\"text\":\"Hello\",\"format\":{\"bold\":true}}")
    private String content;
    
    @Schema(description = "操作时间")
    private LocalDateTime createdAt;
} 